<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test QRCode</title>
</head>

<body>
    <!-- <canvas width="300" height="300" id="qrcode"></canvas> -->
</body>
<script>

    let canvas = document.createElement('canvas')
    canvas.width = 300
    canvas.height = 300
    let img = document.createElement('img')
    img.src = ""

    // let canvas = document.querySelector('#qrcode')
    let ctx = canvas.getContext('2d')
    ctx.font = "20px sans-serif"
    ctx.drawImage(img, 32, 0, 256, 256)
    ctx.fillText("32中文132", 50, 280);

    document.body.appendChild(canvas)
    // Clear canvas
    // canvas.height = canvas.height

</script>

</html>